﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace SuppKids.Core.Domain
{
	public class ProductAtStorage : Entity
	{
		[Required]
		public virtual DateTime DeliveryDate { get; set; }

		[Required]
		public virtual string Bill { get; set; }

		[Required]
		public virtual double DeliveryAmount { get; set; }

		public virtual double ConsumptAmount { get; set; }
		[Required]
		public virtual string Supplier { get; set; }

		[Required]
		public virtual string Recipient { get; set; }

		[Required]
		public virtual double Price { get; set; }

		public virtual string QualityCertificateNumber { get; set; }

		[Required]
		public virtual Product Product { get; set; }

		[NotMapped]
		public virtual double Balance
		{
			get
			{
				return this.DeliveryAmount - this.ConsumptAmount;
			}
		}
	}
}